initdir = $(sysconfdir)/init.d
defaultdir = $(sysconfdir)/default
weblogindir = $(pkgdatadir)/web-login
charondir = $(sysconfdir)/charon
hotplugdir = $(sysconfdir)/hotplug.d/iface

dist_init_SCRIPTS = S46firewall-charon S47firewall-charon-prerouting S50dnsmasq S70charon-setup S71charon-topup S72charon-prepaid S75lighttpd-charon
dist_sysconf_DATA = dnsmasq-charon.conf config.xml.in
sysconf_DATA = lighttpd-charon.conf
dist_default_DATA = charon
dist_charon_SCRIPTS = hosts.sh
dist_hotplug_SCRIPTS = 20-ipcheck

lighttpd-charon.conf: lighttpd-charon.conf.in
	sed -e "s,@weblogindir@,$(weblogindir),g" $< > $@

EXTRA_DIST = lighttpd-charon.conf.in

install-data-local:
	mkdir -p $(DESTDIR)/$(charondir)/hosts
	mkdir -p $(DESTDIR)/$(charondir)/prepaid